<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <title>vms | 视频管理面板&{{data.version}}</title>
    <link rel="shortcut icon" href="/static/favicon.ico" type="image/x-icon" />
    <link href="/static/css/font.css?v={{data.version}}" rel="stylesheet">
    <link href="/static/css/weadmin.css?v={{data.version}}" rel="stylesheet">
    <script src="/static/lib/layui/layui.js?v={{data.version}}"></script>
</head>

<body>

  <!-- 顶部开始 -->
  <div class="container">
    <div class="logo">
      <a href="/">VMS视频管理系统</a>
    </div>
    <div class="left_open">
      <!-- <i title="展开左侧栏" class="iconfont">&#xe699;</i> -->
      <i title="展开左侧栏" class="layui-icon layui-icon-shrink-right"></i>

    </div>
    <ul class="layui-nav left fast-add" lay-filter="">
      <li class="layui-nav-item">
        <a href="javascript:;">+新增</a>
        <dl class="layui-nav-child">
          <!-- 二级菜单 -->
          <dd>
            <a onclick="WeAdminShow('百度','https://www.baidu.com/')"><i class="layui-icon layui-icon-list"></i>资讯</a>
          </dd>
        </dl>
      </li>
    </ul>
    <ul class="layui-nav right" lay-filter="">
      <li class="layui-nav-item">
        <a href="javascript:;">{{data.username}}</a>
        <dl class="layui-nav-child">
          <dd>
            <a class="eidt" onclick="userEdit();">修改</a>
          </dd>
          <dd>
            <a class="loginout" onclick="loginOut();">退出</a>
          </dd>
        </dl>
      </li>
      <li class="layui-nav-item to-index">
        <a href="/" target="_blank">前台首页</a>
      </li>
    </ul>

  </div>
  <!-- 顶部结束 -->
  <!-- 中部开始 -->
  <!-- 左侧菜单开始 -->
  <div class="left-nav">
    <div id="side-nav"></div>
  </div>
  <div class="x-slide_left"></div>
  <!-- 左侧菜单结束 -->
  <!-- 右侧主体开始 -->
  <div class="page-content">
    <div class="layui-tab tab" lay-filter="wenav_tab" id="WeTabTip" lay-allowclose="true">
      <ul class="layui-tab-title" id="tabName">
        <li>我的桌面</li>
      </ul>
      <div class="layui-tab-content">
        <div class="layui-tab-item layui-show">
          <!-- <iframe src='/pages/welcome.html' frameborder="0" scrolling="yes" class="weIframe"></iframe> -->
        </div>
      </div>
    </div>
  </div>
  <div class="page-content-bg"></div>
  <!-- 右侧主体结束 -->
  <!-- 中部结束 -->
  <!-- 底部开始 -->
  <div class="footer" id="footer" style="display: none;">
    <div class="copyright">Copyright ©2018-2020 VMS All Rights Reserved</div>
  </div>
  <!-- 底部结束 -->
  <script type="text/javascript">
    var showFooter = true; // 控制是否显示底部示例参数，相关逻辑可删除
    layui.config({
      base: '/static/js/'
      , version: '1011001'
    }).extend({ //设定模块别名
      // admin: 'admin'
      // ,menu: 'menu'
      // , http: 'http'
    });
    layui.use(['jquery', 'admin','menu', 'http'], function () {
      var $ = layui.jquery,
        admin = layui.admin,
        http = layui.http,
        menu = layui.menu;

      $(function () {
        // http.getMenu();
        menu.getMenu('/static/json/menu.json?v='+new Date().getTime());
        admin.tab.tabInit();
        
        var login = JSON.parse(localStorage.getItem("login"));
        if (login) {
          if (login === 0) {
            window.location.href = '/login';
            return false;
          }
        } else {
          window.location.href = '/login';
          return false;
        }

        if (showFooter) {
          var currentY = new Date().getFullYear();
          $('.copyright').html('Copyright ©2018-' + currentY + ' VMS All Rights Reserved');
          $('#footer').show();
        } else {
          $('.left-nav, .page-content').css({ 'bottom': 0 });
          $('#footer').hide();
        }
      });
    });

    function loginOut(){
      window.localStorage.removeItem('login');
      window.location.href = '/login';
    }

    function userEdit(){
      WeAdminShow('用户修改','/user/edit' ,480, 300);
    }

  </script>
</body>
<!--Tab菜单右键弹出菜单-->
<ul class="rightMenu" id="rightMenu">
  <li data-type="fresh">刷新</li>
  <li data-type="current">关闭当前</li>
  <li data-type="other">关闭其它</li>
  <li data-type="all">关闭所有</li>
</ul>
<!-- {% block content %}{% endblock %} -->
</html>